package com.vgemv.jsutilitysdk.JsTextView;

import android.content.Context;
import android.graphics.Canvas;
import android.widget.TextView;

import androidx.annotation.NonNull;

import com.vgemv.jsutilitysdk.log.JsLogManager;

public class JsTextView extends TextView {

//    private

    public JsTextView(@NonNull Context context) {
        super(context);
    }

    @Override
    protected void onDraw(Canvas canvas) {
        super.onDraw(canvas);
    }

    @Override
    protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
        super.onMeasure(widthMeasureSpec, heightMeasureSpec);

        int width = getMeasuredWidth();
        int height = getMeasuredHeight();
//        setMeasuredDimension(300,53);
        JsLogManager.logc_d("JsTextView/onMeasure","Width is %d,height is %d",width,height);
    }

    @Override
    protected void onLayout(boolean changed, int left, int top, int right, int bottom) {
        super.onLayout(changed, left, top, right, bottom);
        JsLogManager.logc_d("JsTextView/onLayout","changed is %b,left: %d,top: %d,right: %d,bottom: %d",changed,left,top,right,bottom);
    }
}
